<template>
  <div>
    <el-carousel type="card" :interval="4000" arrow="always" style="width: 84vw;">
      <el-carousel-item v-for="item in imageList" :key="item">
        <img :src="item" alt="error" style="object-fit: scale-down; width: 100%;height: 100%;"/>
      </el-carousel-item>
    </el-carousel>
    
  </div>
</template>
  
  <script setup>
import { ref } from "vue";
import { ElMessage } from "element-plus";
const form = ref({
  adminName: "",
  password: "",
});

const imageList = ref([
  require('@/assets/1.jpg'),
  require('@/assets/2.jpg'),
  require('@/assets/3.jpg'),
  require('@/assets/4.jpg'),
  
])
const onSubmit = () => {
  ElMessage({
    message: "登录失败，请输入完整信息！",
    type: "warning",
    plain: true,
  });
};
</script>
  
  <style scoped>
.el-carousel__item h3 {
  color: #475669;
  opacity: 0.75;
  line-height: 300px;
  margin: 0;
  text-align: center;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
</style>